<%--
  Created by IntelliJ IDEA.
  User: 陈俊雄
  Date: 2018/3/1
  Time: 17:02
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  %>
<div class="modal-header">
    <button class="close" ng-click="cancel()">
        <span aria-hidden="true">×</span>
    </button>
    <h3 class="modal-title" id="modal-title">订单号&nbsp;{{orderInfo.id}}&nbsp;详情：</h3>
</div>
<div class="modal-body" id="modal-body">
    <div class="ibox-content sk-loading no-padding no-borders">
        <div class="sk-spinner sk-spinner-wave">
            <div class="sk-rect1"></div>
            <div class="sk-rect2"></div>
            <div class="sk-rect3"></div>
            <div class="sk-rect4"></div>
            <div class="sk-rect5"></div>
        </div>
        <h3>订单信息：</h3>
        <div class="table-responsive">
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">商户订单号</th>
                    <th class="text-center">通道编号</th>
                    <th class="text-center">银行流水号</th>
                    <th class="text-center">银行时间</th>
                    <th class="text-center">清算状态</th>
                    <th class="text-center" ng-show="financeShow">清算金额</th>
                    <th class="text-center" ng-show="financeShow">清算时间</th>
                </tr>
                <tr ng-switch="orderInfo.financeStatus">
                    <td class="text-center">{{orderInfo.merOrderId}}</td>
                    <td class="text-center">{{orderInfo.merchantId}}</td>
                    <td class="text-center">{{orderInfo.bankOrderId}}</td>
                    <td class="text-center">{{orderInfo.bankTime}}</td>
                    <td class="text-center" ng-switch-when="0">未清算</td>
                    <td class="text-center" ng-switch-when="1">已清算</td>
                    <td class="text-center" ng-show="financeShow">
                        {{orderInfo.financeAmount}}
                    </td>
                    <td class="text-center" ng-show="financeShow">{{orderInfo.financeTime}}</td>
                </tr>
            </table>
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">交易金额</th>
                    <th class="text-center">交易人名币金额</th>
                    <th class="text-center">交易汇率</th>
                </tr>
                <tr>
                    <td class="text-center">
                        {{orderInfo.amount | currency:orderInfo.currency}}
                    </td>
                    <td class="text-center">{{orderInfo.rmbAmount | currency:'¥'}}</td>
                    <td class="text-center">{{orderInfo.rate | number:4}}</td>
                </tr>
            </table>
        </div>

        <h3 ng-show="changeShow">异常信息：</h3>
        <div class="table-responsive" ng-show="changeShow">
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">异常单号</th>
                    <th class="text-center">异常类型</th>
                    <th class="text-center">异常金额</th>
                    <th class="text-center">异常信息</th>
                    <th class="text-center">申请时间</th>
                    <th class="text-center">审核时间</th>
                </tr>
                <tr ng-repeat="x in orderChange" ng-switch="x.type">
                    <td class="text-center">{{x.id}}</td>
                    <td class="text-center" ng-switch-when="0">正常</td>
                    <td class="text-center" ng-switch-when="1">冻结</td>
                    <td class="text-center" ng-switch-when="2">全额退款</td>
                    <td class="text-center" ng-switch-when="3">部分退款</td>
                    <td class="text-center" ng-switch-when="4">全额拒付</td>
                    <td class="text-center" ng-switch-when="5">部分拒付</td>
                    <td class="text-center" ng-switch-when="6">代理拒付</td>
                    <td class="text-center" ng-switch-when="7">银行处理退款中</td>
                    <td class="text-center">
                        {{x.amount | number : 2}}&nbsp;{{orderInfo.currency}}({{x.rmbAmount | currency : '¥'}})
                    </td>
                    <td class="text-center">{{x.reasons}}</td>
                    <td class="text-center">{{x.applicationTime | date : 'yyyy/MM/dd hh:mm'}}
                    </td>
                    <td class="text-center">{{x.auditTime | date : 'yyyy/MM/dd hh:mm'}}</td>
                </tr>
            </table>
        </div>

        <h3>支付信息：</h3>
        <div class="table-responsive">
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">类型</th>
                    <th class="text-center">卡号</th>
                    <th class="text-center">姓名</th>
                </tr>
                <tr>
                    <td class="text-center">{{cardHolder.payType}}</td>
                    <td class="text-center">{{cardHolder.simpleCard}}</td>
                    <td class="text-center">
                        {{cardHolder.firstName}}&nbsp;{{cardHolder.lastName}}
                    </td>
                </tr>
            </table>
        </div>

        <h3>收货信息：</h3>
        <div class="table-responsive">
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">姓名</th>
                    <th class="text-center">手机</th>
                    <th class="text-center">邮箱</th>
                    <th class="text-center">国家</th>
                    <th class="text-center">州省</th>
                    <th class="text-center">城市</th>
                    <th class="text-center">地址</th>
                    <th class="text-center">邮编</th>
                </tr>
                <tr>
                    <td class="text-center">
                        {{orderDetail.firstName}}&nbsp;{{orderDetail.lastName}}
                    </td>
                    <td class="text-center">{{orderDetail.phone}}</td>
                    <td class="text-center">{{orderDetail.email}}</td>
                    <td class="text-center">{{orderDetail.country}}</td>
                    <td class="text-center">{{orderDetail.province}}</td>
                    <td class="text-center">{{orderDetail.city}}</td>
                    <td class="text-center" style="max-width: 100px">
                        <div class="hidden-text" style="max-width: 100px" uib-tooltip="{{orderDetail.address}}">
                            {{orderDetail.address}}
                        </div>
                    </td>
                    <td class="text-center">{{orderDetail.zip}}</td>
                </tr>
            </table>
        </div>

        <h3 ng-show="cargoShow">快递信息：</h3>
        <div class="table-responsive" ng-show="cargoShow">
            <table class="table table-condensed table-striped table-hover table-bordered">
                <tr>
                    <th class="text-center">快递公司</th>
                    <th class="text-center">快递单号</th>
                    <th class="text-center">上传时间</th>
                    <th class="text-center">修改时间</th>
                    <th class="text-center">按钮</th>
                </tr>
                <tr>
                    <td class="text-center">{{cargoTrack.expressName}}</td>
                    <td class="text-center">{{cargoTrack.expressNo}}</td>
                    <td class="text-center">
                        {{cargoTrack.createTime | date : 'yyyy/MM/dd hh:mm'}}
                    </td>
                    <td class="text-center">
                        {{cargoTrack.modifyTime | date : 'yyyy/MM/dd hh:mm'}}
                    </td>
                    <td class="text-center p-6">
                        <button class="btn btn-xs btn-success no-margins">btn</button>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>